package com.myproject.mall.domain.holder;

import com.myproject.mall.domain.vo.UserVO;

public class UserHolder {
    private static final ThreadLocal<UserVO> USER_HOLDER = new ThreadLocal<>();

    public static void setUser(UserVO userVO) {
        USER_HOLDER.set(userVO);
    }

    public static UserVO getUser() {
        return USER_HOLDER.get();
    }

    public static void remove() {
        USER_HOLDER.remove();
    }
}
